home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / time / sunclock / sunclock.prowrite (.txt) < prev    next >
Amiga ProWrite Document  |  1992-08-03  |  6KB  |  40 lines

  1. "WORDFONT
  2. topaz
  3. "% $!#
  4. SunClock - Amiga Version 1.0TEXT
  5. Amiga Version by Mark Waggoner, <waggoner@ichips.intel.com> based on an X11 version by John Mackin,  <john@cs.su.oz.AU>, based on a Suntools program by John Walker,  <kelvin@acad.uu.NET>.
  6.     OVERVIEW:
  7. $This program is a clock that shows which portion of the Earth's surface is illuminated by the Sun.  It is designed to be usually iconic (a window on the workbench screen), but can be opened for a larger display with the time updated every second and both the local timezone and UTC displayed.PARA
  8. OPTIONS and TOOLTYPES:PARA
  9. :The CLI options and the tooltypes are the same.  They are:PARA
  10. RLEFT=n    Set the X coordinate of the workbench window.             Example: LEFT=100TEXT
  11. OTOP=n    Set the Y coordinate of the workbench window.             Example: TOP=10
  12. 'DONOTADJUST    Normally, if you start SunClock with a workbench that is not interlaced, it will halve the height of the map image by displaying only every other line.  If you don't want it to do this, add a DONOTADJUST tooltype or option.  Note that under 1.3, the tooltype needs to be DONOTADJUST=
  13. FULLSCREEN    Start the program with the full screen image rather than the workbench window.  Under 1.3, the tooltype needs to be FULLSCREEN=PARA
  14. aTooltypes and CLI options MUST be in uppercase.  An example of starting sunclock from the CLI is:
  15. $SunClock TOP=10 LEFT=300 DONOTADJUSTTEXT
  16. OPERATION:PARA
  17. There are only three things you can do with SunClock.  Switch between the "iconized" workbench window and a full screen display, bring up the "About" window, and quit.  Switching from the workbench window to the full screen display is accomplished by selecting the "Iconize" project menu or by double clicking on the image.  Double clicking on the workbench window will switch you to a full screen display, while double clicking on the full screen display will switch you back to the workbench window.
  18. The "About" project menu will open a window with a brief synopsis of the program options.  You may quit the program entirely by clicking on the close window gadget of the workbench window or selecting the "Quit" project menu.
  19. WHAT TIME IS IT?PARA
  20.  In order for SunClock to correctly calculate the illuminated portion of the globe, it must know what time zone you are in and how far away from GMT (Greenwich Mean Time) you are.  This is accomplished by reading the environment variable TZ.  The value that this should take is as follows:TEXT
  21.    ZZZnDDDTEXT
  22. +where: ZZZ = your time zone name (e.g. PST)
  23. 7         n = the number of hours you are away from GMT.
  24. 9       DDD = your time zone name during daylight savings.
  25. UFor the west coast of the United States, this would be accomplished with the command:
  26.    Setenv TZ PST8PDTTEXT
  27. PThis format is determined by the Aztec C library function gmtime().  If you do not set this environment variable, SunClock will assume that the time it retrieves from the system is GMT and, unless you live in England, you will get an incorrect view of the world.  Note that Aztec's time functions don't actually do anything with the daylight savings time zone name, so it is not actually necessary.  If you want the time zone to be correct during daylight savings time, you will need to change the value of the TZ environment variable.  For the Pacific time zone, for example, you would need:TEXT
  28.    setenv TZ PDT8
  29. BUGS:
  30. The illuminated area shown is the area which would be sunlit if the Earth  had no atmosphere.  The actual illuminated area is larger because of  atmospheric refraction and twilight.
  31. qYou will get an incorrect view if the environment variable TZ has not been set or is incorrectly set.  See above.
  32. CThe program has been tested on Amiga OS V2.04 and 1.3.  If you find bugs, please report them to me (Mark Waggoner).  The program was developed with Aztec C V5.0a, and completed with V5.2a to make the environment variables compatable with the standard Amiga environment variables.  I do not know if it will compile with SAS.
  33. OTHER CREDITS:PARA
  34. The X11 version was posted in comp.sources.x Volume 9, Issue 62. The original Suntools program was posted in comp.sources.sun  Volume 1, Issue 79.TEXT
  35. This program is public domain and may be freely copied as long as the notices at the top of Main.c remain intact.  (I suppose "public domain" and restrictions are contradictory, but I'm going with what the previous versions of the program required.)
  36. BACKGROUND:
  37. RSunClock calculates the position of the Sun using the algorithm in  chapter 18 of:PARA
  38. e"Astronomical Formulae for Calculators" by Jean Meeus, Third Edition,  Richmond: Willmann-Bell, 1985.
  39. and Mercator projects the illuminated area onto map image.  The Sun's  position is calculated to better than one arc-second in accuracy.HEAD
  40.